//package com.itheima.test;
//
//import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
//import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
//import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody;
//import com.aliyun.teaopenapi.models.Config;
//
//public class SendSms {
//    public static void main(String[] args_) throws Exception {
//
//        String accessKeyId="LTAI4GKgob9vZ53k2SZdyAC7";
//        String accessKeySecret="LHLBvXmILRoyw0niRSBuXBZewQ30la";
//
//        //配置阿里云
//        Config config = new Config()
//                // 您的AccessKey ID
//                .setAccessKeyId(accessKeyId)
//                // 您的AccessKey Secret
//                .setAccessKeySecret(accessKeySecret)
//                .setEndpoint("dysmsapi.aliyuncs.com");
//
//        com.aliyun.dysmsapi20170525.Client client=new com.aliyun.dysmsapi20170525.Client(config);
//
//        SendSmsRequest sendSmsRequest = new SendSmsRequest()
//                .setPhoneNumbers( "13870188256") //目标手机号
//                .setSignName("ABC商城") //签名名称
//                .setTemplateCode("SMS_204756062") //短信模板code
//                .setTemplateParam("{\"code\":\"1111\"}"); //模板中变量替换
//        SendSmsResponse sendSmsResponse = client.sendSms(sendSmsRequest);
//
//        SendSmsResponseBody body = sendSmsResponse.getBody();
//
//        // code = OK 代表成功
//        System.out.println(body.getCode() + "  " + body.getMessage());
//    }
//
//}